<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    p.blur {
      filter: blur(1px);
    }

    .img {
      width: 500px;
      height: 400px;
      background: url('https://images.pexels.com/photos/3142540/pexels-photo-3142540.jpeg?cs=srgb&dl=pexels-3142540.jpg&fm=jpg') no-repeat;
      background-size: cover;
    }

    .img_blur {
      filter: blur(4px);
    }

    .img_contrast {
      filter: contrast(200%);
    }
    .img_grayscale {
      filter: grayscale(80%);
    }
    .img_hue_rotate {
      filter: hue-rotate(90deg);
    }
    .img_drop_shadow {
      filter: drop-shadow(16px 16px 20px red) invert(75%);
    }
  </style>
</head>

<body>
  <p>
    filter CSS属性将模糊或颜色偏移等图形效果应用于元素。
    滤镜通常用于调整图像，背景和边框的渲染。
  </p>
  <hr>
  <strong>模糊操作</strong>
  <p class="blur">
    filter: blur(5px);
    模糊操作,会将整个盒子进行模糊
  </p>

  不模糊处理的图像👇
  <div class="img">
  </div>
  模糊处理的图像👇
  <div class="img img_blur">
  </div>
  <hr>
  <strong>
    filter: contrast(200%);
    对比度
  </strong>
  <div class="img">
  </div>
  <div class="img img_contrast">
  </div>
  <hr>
  <br>
  <br>
  <strong>
    filter: grayscale(80%);
    灰度   清明节网站变灰，即是依靠此操作快速变灰
  </strong>
  <br>
  <br>
  <div class="img">
  </div>
  <div class="img img_grayscale">
  </div>

  <hr>
  <br>
  <br>
  <strong>
    filter: hue-rotate(90deg);
    色相
  </strong>
  <div class="img">
  </div>
  <div class="img img_hue_rotate">
  </div>
  <hr>
  <br>
  <br>
  <strong>
    filter: drop-shadow(16px 16px 20px red) invert(75%);
    下落阴影
  </strong>
  <div class="img">
  </div>
  <div class="img img_drop_shadow">
  </div>

</body>

</html>